import Vue from 'vue'
import App from './App'
import uView from 'uview-ui';
Vue.use(uView);
Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})

Vue.prototype.$windowHeight = ()=>{
	var h = uni.getSystemInfoSync().windowHeight
	if(h <= 1080){
		h = 1080
	}
	return h*2
}
Vue.prototype.$windowWidth = ()=>{
	var w = uni.getSystemInfoSync().windowWidth
	if(w >= 1920){
		w = 1920
	}
	return w*2
}

Vue.prototype.callFun = function(name,data,success){
	uniCloud.callFunction({
		name:name,
		data:data,
		success:success,
		fail(err) {
			console.log(err);
		}
	})
}

Vue.prototype.callFun = function(name,data,success,fail){
	uniCloud.callFunction({
		name:name,
		data:data,
		success:success,
		fail:fail
	})
}
app.$mount()
